 
<include file="./Public/header" />

<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close"
                        data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    用户注册
                </h4>
            </div>
                
                <div class="modal-dialog" role="document">
                   
                     <form method="post"  action="{:U('Admin/Index/userAdd')}" enctype="multipart/form-data" class="form-horizontal"> 
                      <div class="modal-body"> 
                           

                            <div class="form-group">
                            <label for="exampleInputEmail1" class="col-md-3 control-label">用户名： </label>
                            <div class="col-md-5">
                            <input type="text" class="form-control" name="username" >
                            </div>
                            </div>
                            <div class="form-group">
                            <label for="exampleInputPassword1" class="col-md-3 control-label">密码：</label>
                             <div class="col-md-5">
                            <input type="password" class="form-control" name="pass"></div>
                            </div>
                            <div class="form-group">
                            <label for="exampleInputFile" class="col-md-3 control-label">确认密码： </label>
                             <div class="col-md-5">
                            <input type="password" class="form-control" name="pass1"></div>
                            </div>
                            <div class="form-group">
                            <label class="col-md-3 control-label">真实姓名：</label>
                             <div class="col-md-5">
                            <input type="text"  class="form-control" name="realname"></div>
                            </div>
                            
                            <div class="form-group">
                            <label for="exampleInputEmail1" class="col-md-3 control-label">邮箱： </label>
                            <div class="col-md-5">
                            <input type="email"  class="form-control"name="email"></div>
                            </div>
                            <div class="form-group">
                            <label for="exampleInputEmail1" class="col-md-3 control-label">电话： </label>
                            <div class="col-md-5">
                            <input type="tel"class="form-control" name="tele"></div>
                            </div>
                            <div class="form-group">
                            <label for="exampleInputEmail1" class="col-md-3 control-label">头像： </label>
                            <div class="col-md-5">
                            <input type="file"class="form-control" name="photo"></div>
                            </div>
                           
                          </div>      
           
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                            <button type="submit" class="btn btn-primary">注册</button>
                        </div>
                    </form>
                    </div>
                </div>
            
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->

 <!-- Main window -->
      <div class="main_container" id="users_page">

        <div class="row-fluid">
          <ul class="breadcrumb">
            <li><a href="#">Home</a> <span class="divider">/</span></li>
            <li><a href="#">Pages</a> <span class="divider">/</span></li>
            <li class="active">Users</li>
          </ul>
          <h2 class="heading">
              用户管理
              
          </h2>
        </div> <!-- /row-fluid -->

       

        <div class="row-fluid">
          <div class="widget widget-padding span12">
            <div class="widget-header">
        
              <div class="widget-buttons">
                  <a href="add" ><i class="icon-plus"></i></a>
                  <a href="#" data-title="Collapse" data-collapsed="false" class="collapse"><i class="icon-chevron-up"></i></a>
              </div>
            </div>  
            <div class="widget-body">

              <form class="form-inline" action="userSearch">
                <div class="form-group" style="margin-left: 400px">
                   <label for="exampleInputName2">用户名：</label>
                  <input type="text" class="form-control" id="exampleInputName2"  name="username">
                  <button type="submit" class="btn btn-default">搜索</button>

                 <a class="btn btn-default" href="#" data-toggle="modal"  data-target="#myModal">添加</a>
                </div>
                </form>


              <table id="users" class="table table-striped table-bordered dataTable" style="margin-top: 10px">
                    <tr>
                  <th>编号</th>
                  <th class="col-sm-2">头像</th>
                  <th class="col-sm-1">用户名</th>
                  <th class="col-sm-1">真实姓名</th>
                  <th class="col-sm-1">邮箱</th>
                  <th class="col-sm-1">电话</th>
                  <th class="col-sm-1">学号</th>
                  <th class="col-sm-1">状态</th>
                  <th class="col-sm-1">注册时间</th>
                  <th class="col-sm-1">操作</th>
                   </tr>
                <tbody>
                  <volist name="users" id="vo" mod="2" empty="暂时没有数据" key="k">
                  
                  <tr>
                  <td>{$k}</td>
                  <td><img src="__PUBLIC__/uploads/photo/{$vo.photo}" width="100%"></td>
                  <td>{$vo.username}</td>
                  <td>{$vo.realname}</td>
                  <td>{$vo.email}</td>
                  <td>{$vo.tele}</td>
                   <td>{$vo.num}</td>
                  <td>
                    <if condition="$vo.state eq 0"> 普通学生
                           <else/>社团管理员 
                    </if>

                  </td>
                  <td>{$vo.regtime}</td>
                  <td>
                  <div class="btn-group">
                        <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#">
                        操作
                          <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu pull-right">
                          <li><a href="userModify?id={$vo.id}"><i class="icon-edit"></i> 修改</a></li>
                          <li><a href="userDel?id={$vo.id}"><i class="icon-trash"></i> 刪除</a></li>
                          <if condition="$vo.state eq 0"><li><a href="seboss?id={$vo.id}"> 社团管理员<a></li>
                           <else/><li><a href="isboss?id={$vo.id}"> 普通学生<a></li>
                    </if>
                        </ul>
                      </div>
                    </td>
                  </tr>
                  </volist>
                 
                    
                </tbody>
                <tfoot>
                  <tr>
                    <td colspan="10" align="center">
                       {$page}
                    </td>
                  </tr>
                </tfoot>
              </table>
             
            </div> <!-- /widget-body -->
          </div> <!-- /widget -->
        </div> <!-- /row-fluid -->

      </div>
      <!-- /Main window -->
   <include file="./Public/footer" />